package br.inf.solutions.apresentacoes.ssp.model;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import br.com.vexillum.model.CommonEntityActivated;

@SuppressWarnings("serial")
@Entity
@Table(name = "squarepostreason")
public class SquarePostReason extends CommonEntityActivated {
	
	public SquarePostReason() {
		
	}
	
	public SquarePostReason(ReasonTransferReserve reasontransferreserve, Square square, PostGraduation post) {
		super();
		this.reasontransferreserve = reasontransferreserve;
		this.square = square;
		this.post = post;
	}
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="reasontransferreserve", nullable=false)
	private ReasonTransferReserve reasontransferreserve;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="id_square", nullable=false)
	private Square square;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="id_post", nullable=false)
	private PostGraduation post;

	public ReasonTransferReserve getReasontransferreserve() {
		return reasontransferreserve;
	}

	public void setReasontransferreserve(ReasonTransferReserve reasontransferreserve) {
		this.reasontransferreserve = reasontransferreserve;
	}

	public Square getSquare() {
		return square;
	}

	public void setSquare(Square square) {
		this.square = square;
	}

	public PostGraduation getPost() {
		return post;
	}

	public void setPost(PostGraduation post) {
		this.post = post;
	}
}
